<template>
	<view class="tenant">
		<image src="https://edsfiles.oss-cn-shenzhen.aliyuncs.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/DIANZHU.jpg" mode=""></image>
 		<!-- <view class="content">
			<text class="title">开店说明</text>
			<text>1、购物前先参加抽彩活动，中奖几率高达1/28,参加只需产品价格5%</text>
			<text>2、手机短信通知会员抽奖序号（1~28）</text>
			<text>3、中奖依据当日上海股市收盘指数末3码除28的余数+1</text>
			<text>4、幸运中奖者，中奖产品在七日内送达，现金则冲抵产品税金</text>
			<text>5、未中奖者，参加易乐透的金额自动转为购物币，可至易度店选购等值商品（购物币可以累积使用）</text>
		</view> -->
		<view class="price">
			价格：<text>450</text>/季度
		</view>
		<view class="clean">
			
		</view>
		<button v-show=" id >= 1" type="warn" @click="navTo('/pages/tenant/tenantmsg?id='+id)">申请开店</button>	
        <button v-show="share_id > 1" class="share-btn" plain="true" open-type="share">
        	邀请他人开店	
        </button>
	</view>
</template>

<script>
	import {getOne} from '../../api/publicapi.js'
	import uniIcons from '../../ed-icons/ed-icons.vue'
	
	export default {
		components: {
			uniIcons
		},
		data() {
			return {
				share_id:1,
                id:1
			}
		},
        onLoad(e) {
           let  id = e.id
            if( id !== undefined){
                this.id = id
            }
            getOne('front/owner/mminigetshaerid', {product_price:450}).then(res => {
               this.share_id = res.data.response
                console.log(  this.share_id)
              })
        },
		methods: {
            onShareAppMessage(res) {
            	let that = this
            	let pages = getCurrentPages();
            	let curPage = pages[pages.length - 1].route;
            	let title = '易度商城店主邀请'
            	let path = '/' + curPage+'?id='+this.share_id 
            	if (res.from === 'button') { // 来自页面内分享按钮
            		console.log(res.target)
            	}
            	console.log(path)
            	return {
            		title: title,
            		path: path,
            		imageUrl: "https://edsfiles.oss-cn-shenzhen.aliyuncs.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/DIANZHU.jpg",
            		desc: '轻松经营无负担，易度帮您备商品。开网店就到易度商城'
            	}
            },
			
            
            
			navTo(url){
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #F7F7F7;
	}
	.tenant{
		height: 900upx;
		width: 750upx;
		image{
			height: 100%;
			width: 100%;
		}
		.content{
			background-color: white;
			color: #595959;
			margin-top: 10upx;
			padding: 10upx 50upx;
			.title{
				text-align: center;
				font-weight: bold;
				font-size: 30upx;
			}
			text{
				margin-bottom: 5upx;
				display: block;
				line-height: 40upx;
				font-size: 26upx;
			}
		}
		.price{
			font-size: 28upx;
			float: right;
			margin: 45upx;
			text{
				color: red;
			}
		}
		.clean{
			clear: both;
		}
		button{
			width: 70%;
			margin-top: 10upx;
			display: flex;
			justify-content: center;	
		}
	}
</style>
